from django.forms import ModelForm
from django import forms
from app_planning.models import Planning, Action, TimeSlot

class PlanningForm(ModelForm):    
    class Meta:
        model = Planning
        fields = ('title','description')
    
    #Reescribiendo los campos para mostrarlos como nos interesa
    title = forms.CharField(widget=forms.TextInput(attrs={'class':'span8'}))
    description = forms.CharField(widget=forms.Textarea(attrs={'class':'span8'}))


class ActionForm(ModelForm):
    class Meta:
        model = Action
        fields = ('title','description','tags')

    #Reescribiendo los campos para mostrarlos como nos interesa
    title = forms.CharField(widget=forms.TextInput(attrs={'class':'span8'}))
    description = forms.CharField(widget=forms.Textarea(attrs={'class':'span8'}))
    tags = forms.CharField(widget=forms.TextInput(attrs={'class':'span8'}))
        

class TimeSlotForm(ModelForm):
    class Meta:
        model = TimeSlot
        fields = ('day','ini_time','end_time')
